package model

import "gorm.io/gorm"

type Order struct {
	gorm.Model
	OrderSn       string  `gorm:"type:varchar(50); not null; comment:'订单编号'"`
	UserId        int64   `gorm:"type:int; not null; comment:'用户Id'"`
	PackageId     int64   `gorm:"type:int; not null; comment:'体检套餐Id'"`
	HospitalId    int64   `gorm:"type:int; not null; comment:'医院Id'"`
	ReserveData   int64   `gorm:"type:int; not null; comment:'预约日期'"`
	Amount        float32 `gorm:"type:decimal(10,2); not null; comment:'订单实际支付金额'"`
	Stock         int64   `gorm:"type:int; not null; comment:'库存'"`
	PaymentMethod int64   `gorm:"type:int; not null; comment:'0 - 微信支付,1 - 支付宝'"`
	PaymentTime   int64   `gorm:"type:int; comment:'支付成功时间'"`
	CancelTime    int64   `gorm:"type:int; comment:'订单取消时间'"`
	Status        int64   `gorm:"type:int; not null; comment:'0 - 待支付，1 - 已支付，2 - 已取消，3 - 已完成，4 - 已退款'"`
}
